<?php
if(!isset($GLOBALS['_vars'])) $GLOBALS['_vars'] = array(); 
$fields = array();
?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>TATA木门公益项目-网上申请</title>
<script language="javascript" src="/js/xrkfrom.js"></script>
<link href="/css/public.css" type="text/css" rel="stylesheet">
<link href="/css/csspub.css" type="text/css" rel="stylesheet">
<link href="templets/style/member.css" rel="stylesheet" type="text/css">
<link href="/hyxt/pc/css/member.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/jquery-1.7.1.min.js"></script>
<script language="javascript" src="/js/left-fixed.js"></script>
<link rel="stylesheet" type="text/css" href="css/reveal.css">
<script language="javascript" src="js/jquery.reveal.js"></script>
<script type="text/javascript" src="templets/js/j.js"></script>
<style type="text/css">
.banner{width:100%;height:260px; overflow:hidden}
.banner img{width:100%;height:400px;}
 .main-inner2{width:1100px;margin:0 auto;position:relative;}
.nav2{height:61px;background:#f6f6f6;width:100%;overflow:inherit;}
.nav2 ul{height:60px;float:left;}
.nav2 ul li{float:left;margin-right:31px;height:61px;}
.nav2 ul li a{color:#333;display:block;line-height:61px;}
.nav2 ul li a:hover{line-height:55px;margin-top:3px;border-bottom:3px solid #d61f26;color:#d61f26;}
.nav2 ul li .nav2-on{line-height:55px;margin-top:3px;border-bottom:3px solid #d61f26;color:#d61f26;}
.position{float:right;}
.position p{line-height:61px;}
.position p img{margin-top:24px;width:17px;height:17px;float:left;padding-right:4px;}
.position p a{margin:0 2px;color:#666;line-height:61px;display:inline-block;}
.images-box{width:159px;height:159px;position:absolute;top:-88px;left:0;}
.images-box .images{width:159px;height:159px;position:relative;display: inline-block;
  background:url(/images/img_01.png) center center no-repeat;}
.images .pic{position: absolute;right: 0px;top: 0px;opacity: 0; -ms-filter: 'alpha(opacity=0)';width:159px;height:159px;cursor:pointer;
  }
.main-nav ul li .on{
  width:auto;
  height:auto;
  margin:0;
  }
.sqzyz .sqzyz-title {
    line-height: 82px;
    font-size: 22px;
    color: #333;
    text-align: center;
}
.sqzyz-body-inner {
    padding-bottom: 30px;
    background:url(images/wssq_02.jpg) bottom center repeat-x;
    line-height: 34px;
    color: #333;
    padding-top: 34px;
    margin-bottom: 30px;
}

.items {
  width:179px;
    padding-top: 19px;
    margin: 0 auto;
}
.yyd{
  width:179px;
  margin:0 auto;
  }
.sqzyz-body-inner div{
    padding-right: 0px;
}
.main1-inner{
  width:877px;
  }
.items .accept-items {
    float: left;
    margin-top: 22px;
}
.items p {
    line-height: 56px;
    font-size: 14px;
    color: #000;
    float: left;
    padding-left: 10px;
}
.button2 {
    width: 177px;
    height: 49px;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    background: #f9f9f9;
    text-align: center;
    line-height: 49px;
    font-size: 18px;
    color: #d7000f;
    cursor: pointer;
}
    </style>
<script type="text/javascript" src="/hyxt/pc/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/js/a.js" charset="utf-8" ></script>
 </head>
<body>
 <div class="banner" style="background:url(http://www.ae-foundation.com/new-style20211021/items/images/TATA-Wooden-Doo-banner.png) center center no-repeat;"></div>
<div class="main-inner nav2">
  <div class="main-inner2">
      <ul>
				<li><a href="http://www.ae-foundation.com/index/534">项目首页</a></li>
				<li><a href="http://www.ae-foundation.com/index/534#section2">项目简介</a></li>
				<li><a href="http://www.ae-foundation.com/index/534#section3">项目进展</a></li>
				<li><a href="http://www.ae-foundation.com/index/534#section4">资助公示</a></li>
				<li><a class="nav2-on" href="http://www.ae-foundation.com/list/538">项目申请</a></li>
			</ul>
      <div class="position"><p> <script type="text/javascript">
            var now=(new Date()).getHours();
      if(now>0&&now<=6){
        document.write("午夜好，");
      }
      else if(now>6&&now<=9){
        document.write("早上好，");
      }
      else if(now>9&&now<=11){
        document.write("上午好，");
      }else if(now>11&&now<=14){
        document.write("中午好，");
      }else if(now>14&&now<=18){
        document.write("下午好，");
      }else{
        document.write("晚上好，");
      }
      </script>
       <a href="#" class="userName"><?php echo $cfg_ml->M_UserName?></a> <a href="../member/index_do_tata.php?fmdo=login&dopost=exit#">[退出]</a> </p></div>
        <div style="clear:both;"></div>
        </div>
  </div>
<div class="main member-main">
<div class="main-inner">
  <div class="main-nav">
      <ul>
          <div class="images-box">
          <div class="images">
<a href="#" data-reveal-id="myModal2" data-animation="none" >
 <?php 
 $face = $cfg_ml->fields['face'];
     if($face!=''){ echo "<img   src='$face' style='_margin-top:expression(( 180 - this.height ) / 2);cursor:pointer'  />\r\n";
   }
  else echo "<img   src='/hyxt/pc/images/img_01.png' style='_margin-top:expression(( 180 - this.height ) / 2);cursor:pointer'   />\r\n";  
            ?>   </a>           </div>
            </div>
          <li><a href="index_tatasq.php?userid='<?php echo $cfg_ml->M_UserName?>'"  target="_self"  class="on">网上申请</a></li>
          <li><a href="content_list_tata.php?channelid=38"  target="_self" class="" >信息管理</a></li>
          <li><a href="zhuangtai_list_tata.php?channelid=38"  target="_self"  class="" >状态查询</a></li>
          <li><a href="edit_baseinfo_tata.php"  target="_self"  class="" >帐号信息</a></li>
        </ul>
    </div>
    <div class="main-body">
      <div class="main1">
  <div class="main1-inner">
      <div class="sqzyz">
        <?php 
                $db->SetQuery("SELECT * FROM aier_addonarticle as b INNER JOIN aier_archives as a  ON b.typeid =a.typeid and  a.typeid=74"); 
                $db->Execute(); 
                $i=0; 
                while($rs = $db->GetArray()){ 
                $i++; 
                ?>  
          <form autocomplete="off" class="sqxy" name="form1" method="post" action="/member/index_tata.php">
          <div class="sqzyz-title"><?php echo $rs['title'];?></div>
            <div class="sqzyz-body sqzyz-body2">
              <div class="sqzyz-body-inner">

<div class="sn_type_a">
<?php echo $rs['body'];?>
</div>    
   

          <div class="items items2">
              <div class="yyd"><input type="checkbox"   id="checked" class="accept-items" name="Preg_index_none_check"><p>已阅读并同意上述文字</p>

          <!-- 选ABC -->

          <input type="hidden" name="sn_ac" value="a" id="">
         <!--  <p>
              <span class="sn_change_ac"><input type="radio" name="sn_ac" value="ab" >  ab</span>
              <span class="sn_change_ac"><input type="radio" name="sn_ac" value="c" >  c</span>
              </p> -->
              <!-- 选ABC  end -->

              </div>
             

                    <p style="display:none;">您需同意上述文字</p>
                <div style="clear:both;"></div>
          <input type="submit" id="register" name="Submit" value="立即申请"  class="button2" />
            </div>
            </div>
            </div>
          </form>
            <?php 
                }?> 
        </div>
</div>
</div>
<script type="text/javascript">
var checked=document.getElementById("checked")
var register=document.getElementById("register")
register.onclick=function(){
        if(checked.checked==true){
                }
        else{
                alert("请勾选申请须知");
                return false
                }
        }
</script>


</div>
</div> <div style="clear:both"></div><div style="clear:both"></div><div style="clear:both"></div><div style="clear:both"></div>
 <script type="text/javascript">
$(".main-form p").click(function(){
    $(this).next("form").slideToggle(300).siblings("form").slideUp(300);
  })
$(".main-nav ul li a").click(function(){
  $('.main-nav ul li a').removeClass('on')
   $(this).addClass('on')
  })
</script>
<!--弹窗开始-->
<div id="myModal2" class="reveal-modal">
 <form action="edit_face.php" method="post" enctype="multipart/form-data" name="form2">
    <input type="hidden" name="dopost" value="save" />
      <div id="mainCp">
       <h3 class="bt">用户头像</h3>
        <div class="postForm">
            <input name="face" type="file" id="face" size="45" />
         </div>
          <div style="clear:both;"></div>
          <p>
            <button class="export" type="submit">&nbsp;&nbsp;&nbsp;&nbsp;更&nbsp;&nbsp;新&nbsp;&nbsp;&nbsp;&nbsp;</button>
          </p>
    </div>
</form> 
</div>
<!--弹窗结束-->
<script>
// 单张上传照片  删除照片
 $(" .fileinput").change(function () {
      var file = this.files[0];
      readFile(file,$(this).parent().siblings(".on"));
 });
 $(".on").mouseover(function () {
      $(this).children(".xian").show();
     $(this).children(".chahao").show();
 });
 $(".on").mouseleave(function () {
     $(this).children(".xian").hide();
      $(this).children(".chahao").hide();
 });
$(".chahao").click(function () {
     $(this).next().remove();
     $(".xian").hide();
     $(".chahao").hide();
     $(this).parent().hide();
      $(this).parent().siblings(".addhao").show();
     $(this).parent().siblings(".addhao").children().val("");
 });
 var on =document.querySelector(".on");
 //    需要把阅读的文件传进来file element是把读取到的内容放入的容器
 function readFile(file,element) {
 //        新建阅读器
 var reader = new FileReader();
 //        根据文件类型选择阅读方式
 switch (file.type){
 case 'image/jpg':
 case 'image/png':
 case 'image/jpeg':
 case 'image/gif':
 reader.readAsDataURL(file);
 break;
}
 //        当文件阅读结束后执行的方法
 reader.addEventListener('load',function () {
 //         如果说让读取的文件显示的话 还是需要通过文件的类型创建不同的标签
 switch (file.type){
     case 'image/jpg':
    case 'image/png':
     case 'image/jpeg':
    case 'image/gif':
    var img = document.createElement('img');
    img.src = reader.result;
    element.append(img);
  //  element.siblings(".addhao").hide();
    element.show();
     break;
   }
  });
 }
 // 批量上传部分
 var piliang = document.querySelector('#piliang');
 var on = $(".on");
 piliang.addEventListener('change',function () {
 for (var i = 0;i < this.files.length;i++){
 var file = this.files[i];
 on.eq(i).children(".chahao").next().remove();
 readFile(file,on.eq(i));
 }
 });
 //
 var on = $(".on");
 $(".next").click(function () {
    for (var i = 0; i < 10; i++) {
    console.log(on[i].childNodes.length);
   if (on[i].childNodes.length==6){
//这个判断就是说明里面有多少个孩子，孩子不够数，不会生成相册
      }else{
           alert("上传照片不足3张");
          $(".next").attr("href","javascript:void(0)");
           return
            }
     $(".next").attr("href","生成相册.html");
    }
 });
</script>
<style>
         .kuang{
              display: inline-block;
              vertical-align: middle;
              box-shadow: inset 0px 1px 20px 5px #ddd;
              text-align: left;
              margin-right: 20px;
              margin-bottom: 20px;
              width: 165px;
              height: 165px;
          }
         .addhao{
        width:80px;
        height:22px;
              background: url(../img/add_photo_plus.png);
        overflow:hidden;
        position:relative;
        cursor:pointer;
          }
          .on{
             width: 273px;
         height: 123px;
         position: relative;
         display: inline-block;
         overflow: hidden;
         border: 1px solid #ebebeb;
         background: url(/member/templets/images/tx.jpg) center center no-repeat;
          }
          .xian{
              width: 165px;
              height: 165px;
              position: absolute;
              display: none;
              z-index: 2;
          }
          .chahao{
              position: absolute;
              width: 60px;
              height: 60px;
              top: 52.5px;
              left: 52.5px;
              display: none;
              z-index: 2;
          }
          .on img{
              max-width: 273px;
          max-height:123px;
              position: absolute;
              left: 0;
              right: 0;
              top: 0;
              bottom: 0;
              margin:auto;
        background:#fff;
          }
          .kuang input{
              width: 164px;
              height: 164px;
              opacity: 0;
          }
          .button{
              width: 500px;
              height: 36px;
              margin: 0 auto;
          }
          .button .set{
              float: left;
              width: 216px;
              height: 36px;
              background: #ddd;
              text-align: center;
             position: relative;
          }
          .set input{
              width: 216px;
              height: 36px;
              opacity: 0;
              position: absolute;
              top: 0;
              left: 0;
          }
          .button .next{
             float: right;
             width: 216px;
             height: 36px;
             background: red;
             color: white;
         }
         .bigk{
             width: 1000px;
             margin: 0 auto;
             text-align: center;
         }
   </style>
<script src="/laydate/laydate.js"></script> 
  <script>
lay('#version').html('-v'+ laydate.v);
//执行一个laydate实例
laydate.render({
  elem: '#chushengriqi' //指定元素
});
laydate.render({
  elem: '#shouzhuriqi' //指定元素
});
laydate.render({
  elem: '#fabingshijian' //指定元素
});
laydate.render({
  elem: '#quezhengshijian' //指定元素
});
laydate.render({
  elem: '#zhiliao1' //指定元素
});
laydate.render({
  elem: '#zhiliao2' //指定元素
});
laydate.render({
  elem: '#cengriqi3' //指定元素
});
laydate.render({
  elem: '#kangfu1shijian' //指定元素
});
laydate.render({
  elem: '#kfjs1' //指定元素
});
laydate.render({
  elem: '#kangfushijian2' //指定元素
});
laydate.render({
  elem: '#kfjs2' //指定元素
});
laydate.render({
  elem: '#kangfushijian3' //指定元素
});
laydate.render({
  elem: '#kfjs3' //指定元素
});
</script>
 </body>
</html>

<style>
.sn_change_ac{
	    width: 145px;
    height: 51px;
    text-align: center;
    line-height: 51px;
    background: #d7000f;
    font-size: 20px;
    color: #fff;
    display: inline-block;
    margin: 0 90px;
}
</style>


<script>
var sn_type_ac = "<?php echo $_GET['sn_type_ac'] ?>";


if (sn_type_ac == 'a'){
	$(".sn_type_c").hide()
}
if (sn_type_ac == 'c'){
	$(".sn_type_a").hide()
}
</script>